<template>
    <div> 
        显示数据
        {{ username }} {{ password }}
    <div>
用户名<input type="text" v-model="username">
    </div>
    <div>
        密码<input type="password" v-model="formData.password">
    </div>
    <div>
        <button @click="login">登录</button>
    </div>
</div>
</template>
<script setup>
import {ref} from 'vue'
let username = ref('')
let password = ref('')
let formData = ref({
    username:'',
    password:'',
    gender:'',
    age:''

})
const login = ()=>{
    console.log(username.value,password.value,'实现登录');
}

</script>
<style scoped>
</style>